package config

// name: 'sub_srv'
// host: '192.168.129.84'
// port: '8082'
// mysql:
// host: '127.0.0.1'
// port: 3306
// user: root
// password: '123456'
// db: 'grpcproject'
// consul:
// host: '192.168.129.84'
// port: 8500

type ConsulConfig struct {
	Host string `mapstructure:"host"`
	Port int    `mapstructure:"port"`
}

type MysqlConfig struct {
	Host     string `mapstructure:"host"`
	Port     int    `mapstructure:"port"`
	User     string `mapstructure:"user"`
	Password string `mapstructure:"password"`
	Name     string `mapstructure:"db"`
}

type SrvConfig struct {
	Name       string       `mapstructure:"name"`
	Host       string       `mapstructure:"host"`
	Port       int          `mapstructure:"port"`
	MySqlConf  MysqlConfig  `mapstructure:"mysql"`
	ConsulConf ConsulConfig `mapstructure:"consul"`
}
